using System; 
using System.Collections.Generic; 
using System.Text; 
using FluentNHibernate.Mapping;
using Managistics.Model; 

namespace Managistics.Model.Mappings {
    
    
    public class DetailOrderNnMap : ClassMap<DetailOrderNn> {
        
        public DetailOrderNnMap() {
			Table("DETAIL_ORDER_NN");
			LazyLoad();
			CompositeId().KeyProperty(x => x.OrderidNn, "ORDERID_NN")
			             .KeyProperty(x => x.ItemId, "ITEM_ID");
			References(x => x.OrderNhanhNhanh).Column("ORDERID_NN");
			References(x => x.Items).Column("ITEM_ID");
			Map(x => x.QuantityNn).Column("QUANTITY_NN").Not.Nullable().Precision(53);
			Map(x => x.DiscountNn).Column("DISCOUNT_NN").Precision(53);
			Map(x => x.UnitPriceNn).Column("UNIT_PRICE_NN").Not.Nullable().Precision(53);
			Map(x => x.StatusItemFd).Column("STATUS_ITEM_FD");
			Map(x => x.Vat).Column("VAT").Not.Nullable().Precision(5);
			Map(x => x.Id).Column("Id").Not.Nullable().Precision(18);
        }
    }
}
